home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / ConUnit.mod < prev    next >
Text File  |  1995-06-29  |  4KB  |  109 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: ConUnit.mod $
  4.   Description: Interface to console.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   $VER: conunit.h 36.15 (20.11.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. <* STANDARD- *>
  24.  
  25. MODULE [2] ConUnit;
  26.  
  27. IMPORT
  28.   e := Exec, ie := InputEvent, km := KeyMap, gfx := Graphics,
  29.   i := Intuition, c := Console, s := Sets;
  30.  
  31.  
  32. (*
  33. **      Console device unit definitions
  34. *)
  35.  
  36. CONST
  37.  
  38. (* ---- console unit numbers for OpenDevice() *)
  39.   library    * = -1;      (* no unit, just fill in device field *)
  40.   standard   * = 0;       (* standard unmapped console *)
  41.  
  42. (* ---- New unit numbers for OpenDevice() - (V36) *)
  43.  
  44.   charMap    * = 1;       (* bind character map to console *)
  45.   snipMap    * = 3;       (* bind character map w/ snip to console *)
  46.  
  47. (* ---- New flag defines for OpenDevice() - (V37) *)
  48.  
  49.   flagDefault               * = {};
  50.   flagNodrawOnNewsize       * = {0};
  51.  
  52.  
  53.   pmbAsm         * = c.mLNM+1;       (* internal storage bit for AS flag *)
  54.   pmbAwm         * = pmbAsm+1;     (* internal storage bit for AW flag *)
  55.   maxTabs        * = 80;
  56.  
  57. TYPE
  58.  
  59.   ConUnitPtr * = POINTER TO ConUnit;
  60.   ConUnit * = RECORD (e.MsgPortBase)
  61.     mp *           : e.MsgPort;
  62.     (* ---- read only variables *)
  63.     window -       : i.WindowPtr; (* intuition window bound to this unit *)
  64.     xCP -          : INTEGER;     (* character position *)
  65.     yCP -          : INTEGER;
  66.     xMax -         : INTEGER;     (* max character position *)
  67.     yMax -         : INTEGER;
  68.     xRSize -       : INTEGER;     (* character raster size *)
  69.     yRSize -       : INTEGER;
  70.     xROrigin -     : INTEGER;     (* raster origin *)
  71.     yROrigin -     : INTEGER;
  72.     xRExtant -     : INTEGER;     (* raster maxima *)
  73.     yRExtant -     : INTEGER;
  74.     xMinShrink -   : INTEGER;     (* smallest area intact from resize process *)
  75.     yMinShrink -   : INTEGER;
  76.     xcCP -         : INTEGER;     (* cursor position *)
  77.     ycCP -         : INTEGER;
  78.  
  79.     (* ---- read/write variables (writes must must be protected) *)
  80.     (* ---- storage for AskKeyMap and SetKeyMap *)
  81.     keyMapStruct * : km.KeyMap;
  82.     (* ---- tab stops *)
  83.     tabStops *     : ARRAY maxTabs OF e.UWORD;
  84.                                     (* 0 at start, 0FFFFH at end of list *)
  85.  
  86.     (* ---- console rastport attributes *)
  87.     mask *         : s.SET8;
  88.     fgPen *        : SHORTINT;
  89.     bgPen *        : SHORTINT;
  90.     aolPen *       : SHORTINT;
  91.     drawMode *     : s.SET8;
  92.     obsolete1 *    : SHORTINT;    (* was cuAreaPtSz -- not used in V36 *)
  93.     obsolete2 *    : e.APTR;      (* was cuAreaPtrn -- not used in V36 *)
  94.     minterms *     : ARRAY 8 OF e.UBYTE; (* console minterms *)
  95.     font *         : gfx.TextFontPtr;
  96.     algoStyle *    : e.UBYTE;
  97.     txFlags *      : s.SET8;
  98.     txHeight *     : e.UWORD;
  99.     txWidth *      : e.UWORD;
  100.     txBaseline *   : e.UWORD;
  101.     txSpacing *    : INTEGER;
  102.  
  103.     (* ---- console MODES and RAW EVENTS switches *)
  104.     modes *        : ARRAY (pmbAwm+7) DIV 8 OF s.SET8;  (* one bit per mode *)
  105.     rawEvents *    : ARRAY (ie.classMax+8) DIV 8 OF s.SET8;
  106.   END; (* ConUnit *)
  107.  
  108. END ConUnit.
  109.